package nc.ui.arap.flow.verify;

import java.util.Map;

import nc.ui.arap.service.IRemoteCallItem;
import nc.vo.arap.service.ServiceVO;
import nc.vo.arap.verifynew.MethodVO;
import nc.vo.pub.BusinessException;

public class VerifyMethodCall implements IRemoteCallItem {

	private VerifyAbstractPanel panel;

	protected ServiceVO serviceVO = null;

	public VerifyMethodCall(VerifyAbstractPanel new1) {
		panel = new1;
	}

	public ServiceVO getServiceVO() {

		if (serviceVO == null) {
			serviceVO = new ServiceVO();
			serviceVO.setClassname("nc.itf.arap.prv.IArapVerifyLogPrivate");
			serviceVO.setMethodname("getMethods");
			serviceVO.setParamtype(new Class[] { Integer.class });
			serviceVO.setParam(new Object[] { new Integer(1) });
			serviceVO.getCode();
		}
		return serviceVO;

	}

	public void handleResult(Map<String, Object> datas) throws BusinessException {
		if (panel == null)
			return;
		if (panel instanceof VerifySumPanelNew) {
			((VerifySumPanelNew) panel).methods = (MethodVO[]) datas.get(serviceVO.getCode());
		} else if (panel instanceof VerifyPanelNew) {
			((VerifyPanelNew) panel).methods = (MethodVO[]) datas.get(serviceVO.getCode());
		}

	}
}
